/*
 * $Id$
 */
package py.firefly.web.dict;

import java.io.File;
import java.util.Scanner;


/**
 *
 * @author myang
 */
public class EntryFileReader implements EntryReader {

    @Override
    public String read(final String entry) {
        try {
            final String content = 
              new Scanner(new File("/Temp/data2/" + entry), "UTF-8").useDelimiter("\\A").next();
//            System.out.println(content);
//            PrintStream ps = new PrintStream(System.out, true, "UTF-8");
//            ps.println(content);
            return content;
        } catch (final Exception ex) {
            return ex.getMessage();
        }
    }
}
